package com.fx.common.impl;

import com.fx.common.AbsButtonController;
import com.fx.gen.domain.BuildProjectInfo;
import com.fx.server.FxUiNewServer;

import java.util.function.Supplier;

public class CreateProjectController extends AbsButtonController<BuildProjectInfo> {

    private final FxUiNewServer fxUiNewServer;

    public CreateProjectController(Supplier<BuildProjectInfo> createSource,FxUiNewServer fxUiNewServer) {
        super(createSource);
        this.fxUiNewServer = fxUiNewServer;
    }

    @Override
    public void accept(BuildProjectInfo buildProjectInfo) {
        fxUiNewServer.createNewProject(buildProjectInfo);
    }

}
